import amaret.freestyle.mcu.atmega.mega168.McuC;

import McuC.Mcu;
import McuC.GlobalInterrupts;
import McuC.BusyWait;
import McuC.TimerMilli8BitTimer0;
import McuC.TimerMilli8BitTimer0 as TimerMilli;
import McuC.TimerMilli16BitTimer1;
import McuC.Uart;
import McuC.Adc10Bit;

import McuC.BenchmarkCycleCounter16BitTimer1 as BenchmarkCycleCounter;
import McuC.BenchmarkTickMilli8BitTimer0 as BenchmarkTickMilli;

import McuC.PD0 as D0;
import McuC.PD1 as D1;
import McuC.PD2 as D2;
import McuC.PD3 as D3;
import McuC.PD4 as D4;
import McuC.PD5 as D5;
import McuC.PD6 as D6;
import McuC.PD7 as D7;
import McuC.PB0 as D8;
import McuC.PB1 as D9;
import McuC.PB2 as D10;
import McuC.PB3 as D11;
import McuC.PB4 as D12;
import McuC.PB5 as D13;

import McuC.PC0 as AN0;
import McuC.PC1 as AN1;
import McuC.PC2 as AN2;
import McuC.PC3 as AN3;
import McuC.PC4 as AN4;
import McuC.PC5 as AN5;

import amaret.freestyle.board.Board;
import amaret.freestyle.board.Led0;

metaonly module BoardC inherits biosbob.composite.IModule {

    export Board inherits embios.interfaces.IBoard;

    export Mcu;
    export GlobalInterrupts;
    export Uart;
    export BusyWait;
    export TimerMilli;
    export TimerMilli8BitTimer0;
    export TimerMilli16BitTimer1;
    export Adc10Bit;
    
    // Benchmark support
    export BenchmarkCycleCounter;
    export BenchmarkTickMilli;
    
    // Arduino Digital I/O Lines
    export D0;
    export D1;
    export D2;
    export D3;
    export D4;
    export D5;
    export D6;
    export D7;
    export D8;
    export D9;
    export D10;
    export D11;
    export D12;
    export D13;
    
    // Arduino Analog Input Lines
    export AN0;
    export AN1;
    export AN2;
    export AN3;
    export AN4;
    export AN5;
    
    // Arduino Led
    export Led0 inherits embios.interfaces.ILed;
    
}

implementation {

    final Led0.Gpio := D13;

}
